{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "fc0c6b6e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入您的学号：2\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩10次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩9次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩8次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩7次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩6次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩5次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩4次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩3次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩2次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "欢迎使用查询系统，您的账户为VIP账户，查询机会还剩1次\n",
      "请输入您想要查询星期几的课程1\n",
      "星期一有一节python课,将为您自动返回查询系统首页\n",
      "查询机会已经使用完毕，自动退出查询系统\n"
     ]
    }
   ],
   "source": [
    "user_number = int(input(\"请输入您的学号：\"))\n",
    "normal_number = 1\n",
    "vip_number = 2\n",
    "normal_try_times = 5\n",
    "vip_try_times = 10\n",
    "if normal_number == user_number:\n",
    "    while normal_try_times >= 0:\n",
    "        if normal_try_times == 0:\n",
    "            print('查询机会已经使用完毕，自动退出查询系统')\n",
    "            break\n",
    "        else:\n",
    "            print(\"欢迎使用查询系统，您的账户为普通账户，查询机会还剩{}次\".format(normal_try_times))\n",
    "            week_time = int(input(\"请输入您想要查询星期几的课程\"))\n",
    "            if week_time == 1:\n",
    "                normal_try_times -= 1\n",
    "                print('星期一有一节python课,将为您自动返回查询系统首页')\n",
    "            else:\n",
    "                print('非法输入')\n",
    "elif vip_number == user_number:\n",
    "    while vip_try_times >= 0:\n",
    "        if vip_try_times == 0:\n",
    "            print('查询机会已经使用完毕，自动退出查询系统')\n",
    "            break\n",
    "        else:\n",
    "            print(\"欢迎使用查询系统，您的账户为VIP账户，查询机会还剩{}次\".format(vip_try_times))\n",
    "            week_time = int(input(\"请输入您想要查询星期几的课程\"))\n",
    "            if week_time == 1:\n",
    "                vip_try_times -= 1\n",
    "                print('星期一有一节python课,将为您自动返回查询系统首页')\n",
    "\n",
    "            else:\n",
    "                print('非法输入')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b56b2109",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "236f289b",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
